<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>改变背景颜色</title>
    <script language="javascript">
        function changBgClr(value) {
            document.body.style.backgroundColor = value;
        }
    </script>
</head>
<body>
<form>
    <input type="radio" value="red" onclick="changBgClr(this.value)">红色
    <input type="radio" value="green" onclick="changBgClr(this.value)">绿色
    <input type="radio" value="blue" onclick="changBgClr(this.value)">蓝色
</form>
</body>
</html>